function plot_bar_chart_of_cell_division_times(datap, table_idx_list, bInfo, bPlot, bLegend, color_list)

% bar plot
num_cells = length(bInfo.Cell_type);
bar_shift = ([1:length(table_idx_list)]-(1+length(table_idx_list))/2)*bPlot.bw;
for ii = 1:length(table_idx_list)
    bar_color = color_list{2};
    bar_alpha = ii/length(table_idx_list);
    bar([1:num_cells]+bar_shift(ii),datap.avg_time{ii},bPlot.bw,'facecolor', bar_color, 'facealpha', bar_alpha)
    hold on
end

% errorbar plot
for ii = 1:length(table_idx_list)
    for jj = 1:num_cells
        plot([jj+bar_shift(ii) jj+bar_shift(ii)],[datap.avg_time{ii}(jj)-datap.std_time{ii}(jj) datap.avg_time{ii}(jj)+datap.std_time{ii}(jj)], 'k-', 'linewidth', 1, 'handlevisibility', 'off')
    end
end

if strcmp(bInfo.Position, 'e')
    title([bInfo.HeatedCell, ' edge heating at T_{chiller} = ', num2str(bInfo.ChillerTemp), ' degC'])
elseif strcmp(bInfo.Position, 'n')
    title([bInfo.HeatedCell, ' nucleus heating at T_{chiller} = ', num2str(bInfo.ChillerTemp), ' degC'])
elseif strcmp(bInfo.Position, 's')
    title([bInfo.HeatedCell, ' side heating at T_{chiller} = ', num2str(bInfo.ChillerTemp), ' degC'])
else 
end

legend(bLegend, 'location', 'best')
ylabel('Division time (min)')
set(gca, 'XTick', [1:length(bInfo.Cell_type)])
set(gca, 'XTickLabel', bInfo.Cell_type)
set(gca, 'fontsize', bPlot.FontSize)

end